package com.train.service.impl;

import com.train.dto.AttDTO;
import com.train.dto.EmpAttDTO;
import com.train.mapper.AttMapper;
import com.train.pojo.Attendence;
import com.train.service.AttService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AttServiceImpl implements AttService {
    @Autowired
    private AttMapper attMapper;

    @Override
    public List<AttDTO> selectAllAttDTO() {
        return attMapper.selectAllAttDTO();
    }

    @Override
    public List<AttDTO> selectAttByCouresId(Integer id) {
        return attMapper.selectAttByCouresId(id);
    }

    @Override
    public List<EmpAttDTO> selectAllEmpAtt(EmpAttDTO empAttDTO) {
        return attMapper.selectAllEmpAtt(empAttDTO);
    }

    @Override
    public List<EmpAttDTO> selectEmpAttSum(EmpAttDTO empAttDTO) {
        return attMapper.selectEmpAttSum(empAttDTO);
    }

    @Override
    public List<Attendence> selectIsExist(Attendence attendence) {
        return attMapper.selectIsExist(attendence);
    }

    @Override
    public int selectTime(Integer id) {
        return attMapper.selectTime(id);
    }

    @Override
    public int AddAtt(Attendence attendence) {
        return attMapper.AddAtt(attendence);
    }

    @Override
    public int delAtt(Integer id) {
        return attMapper.delAtt(id);
    }
}
